﻿@using KL.Store.Core;
@{
    bool itsIp = false;
    IPAddress address;
    if (IPAddress.TryParse(Request.Url.Host, out address))
    {
        switch (address.AddressFamily)
        {
            case System.Net.Sockets.AddressFamily.InterNetwork:
                itsIp = true;
                break;
            case System.Net.Sockets.AddressFamily.InterNetworkV6:
                itsIp = true;
                break;
            default:
                itsIp = false;
                break;
        }
    }

    if (!itsIp && !Request.Url.Host.Contains("cloudapp") && !Request.Url.Host.Contains("localhost") && ((Parameters.WebSiteUrl.Contains("www.") && !Request.Url.Host.StartsWith("www")) || (Parameters.HttpsEnabled && !Request.IsSecureConnection)))
    {
        var newUrl = Request.Url.AbsoluteUri;
        var isRedirected = false;
        if (Parameters.WebSiteUrl.Contains("www.") && !Request.Url.Host.StartsWith("www"))
        {
            newUrl = newUrl.Replace("://", "://www.");
            isRedirected = true;
        }
        if (Parameters.HttpsEnabled && !Request.IsSecureConnection)
        {
            newUrl = newUrl.Replace("http://", "https://");
            isRedirected = true;
        }
        if (isRedirected)
        {
            Response.Redirect(newUrl);
        }
    }
}
<!DOCTYPE html>
<html lang="en" xmlns:fb="http://ogp.me/ns/fb#">
<head>
    <meta charset="utf-8" />
    <title>@(!string.IsNullOrEmpty(ViewBag.Title) ? ViewBag.Title.Replace("<!--br-->", "") : ViewBag.Title)  | @Parameters.WebSiteTitle</title>
    @if (!string.IsNullOrEmpty(ViewBag.Description))
    {
        <meta name="description" content="@Html.Raw(ViewBag.Description) Hedef AVM'de"/>
    }
    @if (!string.IsNullOrEmpty(ViewBag.Keywords))
    {
        <meta name="keywords" content="@Html.Raw(ViewBag.Keywords)"/>
    }
    @if (!string.IsNullOrEmpty(Parameters.FaceBookAppId))
    {
        <meta property="fb:app_id" content="@Parameters.FaceBookAppId"/>
    }
    @if (!string.IsNullOrEmpty(ViewBag.FacebookSharingImage))
    {
        <meta property="og:image" content="@ViewBag.FacebookSharingImage"/>
    }
    @if (!string.IsNullOrEmpty(ViewBag.CanonicalUrl))
    {
        <link rel="canonical" href="@Html.Raw(ViewBag.CanonicalUrl)" />
    }
    <meta name="google-site-verification" content="juQqyGj89mD1DdHP3lJ0fZVjQsDC0F4oOqYWuNCHgb4" />
    <meta name="p:domain_verify" content="c9c0f3ec64747d8606c18654e37b4e60" />
    <link href="~/Images/@(Parameters.Theme)/favicon.png" rel="shortcut icon" type="image/x-icon" />
    @*<link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css?v=" + DateTime.Now.Year + DateTime.Now.Month)" rel="stylesheet" type="text/css" />*@
    @if (HttpContext.Current.Request.UserAgent != null && HttpContext.Current.Request.UserAgent.ToLower().Contains("msie 10"))
    {
        <meta content="IE=9,chrome=1" http-equiv="X-UA-Compatible" />
    }
    else
    {
        <meta content="IE=Edge,chrome=1" http-equiv="X-UA-Compatible" />
    }
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="language" content="Turkish">
    <meta name="content-language" content="tr-TR" />

    @{ var cjVer = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString(); }

    <link href="@Url.Content("~/Content/bootstrap.min.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/eStore.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/stylesheet.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/slippry.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/jquery.bxslider.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/flexslider.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/jquery.lightbox-0.5.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/font-awesome.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/livesearch.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/livesearch.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/fancybox/jquery.fancybox.css?v=" + cjVer)" rel="stylesheet" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/rcarousel.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/jquery.custom-scrollbar.css?v=" + cjVer)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/font-awesome.min.css?v=" + cjVer)" rel="stylesheet" />
    <link href="@Url.Content("~/Content/editlightbox.css?v=" + cjVer)" rel="stylesheet" />
    <!--[if lte IE 8]>
	    <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/" + Parameters.Theme + "/iefix.css?v=" + cjVer)" />
    <![endif]-->


    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery-1.7.1.min.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/modernizr.min.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery-ui-1.10.4.min.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/slippry.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.bxslider.min.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.flexslider-min.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.elevatezoom.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.lightbox-0.5-mod.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.unobtrusive-ajax.min.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.validate.min.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.validate.unobtrusive.min.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.custom-scrollbar.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/Scripts/jquery.pixelentity.shiner.min.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/Scripts/jquery.maskedinput.min.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/Scripts/jquery.fancybox.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/Scripts/scrollToTop.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/Scripts/jquery.slides.min.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/Scripts/header-general.js?v=" + cjVer)" type="text/javascript"></script>

    @*<link href="@Url.Content("~/Content/cloud-zoom.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/simple_menu.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/touchTouch.css")" rel="stylesheet" type="text/css" />
    *@
    @Html.Raw(Parameters.LiveChatScript)
</head>
<body>
    <div id="header-bg"></div>
    <div id="header">
        <div class="container first last">
            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 first last" id="headertop">
                <div class="col-xs-3 col-sm-3 hidden-md hidden-lg">&nbsp;</div>
                <div class="col-xs-6 col-sm-6 col-md-2 col-lg-2 first last logodiv">
                    <a href="/" title="@(Parameters.WebSiteTitle)">
                        <img id="logo" src="/Images/@(Parameters.Theme)/logo.png" alt="@(Parameters.WebSiteTitle)" />
                    </a>
                </div>
                <div class="col-xs-3 col-sm-3 hidden-md hidden-lg">&nbsp;</div>
                <div class="col-xs-12 col-sm-12 col-md-10 col-lg-10 last headerRight">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
                            <form id="top-search-form" action="/Search/Index" method="get">
                                <input type="text" autocomplete="off" class="input-search" placeholder="Ne aramıştınız?" id="Search" name="Search" />
                                <input type="submit" value="" />
                                <div id="livesearch_search_results" class="window searchview" style="display: none;">
                                    <div id="divSearchResult" style="padding: 6px;">
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
                            <div class="row alignright hidden-xs hidden-sm" id="header-check-list">
                                <ul class="">
                                    <li>Binlerce Çeşit</li>
                                    <li>Kolay Ulaş, Hızlı Al</li>
                                    <li>2 Yıl Garantili</li>
                                </ul>
                            </div>
                            <div class="row alignright" id="header-right-second-row">
                                @{
                                    Html.RenderAction("Login", "Partials");
                                }
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 first last" id="menubar">
                <div class="hidden-xs hidden-sm col-md-10 col-lg-10 first last" id="mainMenuTop">
                    <div id="mainMenu">
                        <ul class="ul-level-0">
                            @{
                                var hasSubMenu = false;
                                if (!string.IsNullOrEmpty(ViewBag.hasSub) && ViewBag.hasSub == "true")
                                {
                                    hasSubMenu = true;
                                }
                            }
                            <li class="menu-level0 @{if (hasSubMenu)
                                                     {<text>hasSub</text>}}"><a href="/kategori/Kategoriler-@(Parameters.MainCategoryId).html">KATEGORİLER</a>
                                @{if (hasSubMenu)
                                  {
                                    <img src="~/Images/@Parameters.Theme/menu-arrow-down.png" />
                                      Html.RenderAction("Categories", "Partials");
                                  }
                                }
                            </li>
                            @Html.Raw(Parameters.PageMainMenu)
                            @*{
                                var hasSubMenu = false;
                                if (!string.IsNullOrEmpty(ViewBag.hasSub) && ViewBag.hasSub == "true")
                                {
                                    hasSubMenu = true;
                                }
                            }
                            <li class="col-md-3 col-lg-3 @{if (hasSubMenu)
                                                           {<text>hasSub</text>}} menu-level0"><a href="/Kategoriler_@(Parameters.MainCategoryId).html" class="menu-link-level0">
                                                           @{if (hasSubMenu)
                                                             {
                                                               <img src="~/Images/@Parameters.Theme/menu-arrow-down.png" />
                                                             }
                                                           }
                                                           Tüm Kategoriler
                                                       </a>
                                <div class="kategoriMenusu subMenu">
                                    @{Html.RenderAction("Categories", "Partials");}
                                </div>
                            </li>
                            @Html.Raw(Parameters.PageMainMenu)

                            *@
                        </ul>
                    </div>
                </div>
                <form class="col-xs-7 col-sm-7 hidden-md hidden-lg">
                    @Html.Raw(Parameters.PageMainMenuMobil)
                </form>
                <div class="col-xs-5 col-sm-5 col-md-2 col-lg-2 first last right" id="CartContainer">
                    <div class="right aligncenter sepetFull" style="width: 100%;">
                        <a href="/Cart/Index">
                            <div id="sepetSonuc">
                                <div id="cart">
                                    @{
                                        Html.RenderAction("GetSummary2", "Cart");
                                    }
                                </div>
                            </div>
                        </a>
                        <div class="sepetHover">
                            <h3>Sepetim</h3>
                            @if (Request.IsAuthenticated || Parameters.AllowVisitorsToUsingCart)
                            {
                                <div id="sepetMinimalContent">
                                    @{Html.RenderAction("GetMinimal", "Cart", new { showPhotos = true, ShowAcrIcrLinks = true });}
                                </div>
                                <div class="right checkout-button">
                                    <a href="/Cart/Index" class="btn btn-custom3"><span>Sepete Git</span></a>
                                    <a href="/Cart/Checkout" class="btn btn-custom1"><span>Sepeti Onayla</span></a>
                                </div>
                            }
                            else
                            {
                                <span>Sepetinizi görebilmek için giriş yapınız.</span>
                            }
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
    <div class="container first last">
        @RenderBody()
        <div class="clearfix"></div>
        @if (ViewBag.ShowFooterGraphs != "false")
        {
            <div id="home-bottom" class="hidden-xs hidden-sm">
                @if (!string.IsNullOrEmpty(Parameters.HomePageUnderBanner))
                {
                    @Html.Raw(Parameters.HomePageUnderBanner)
                }
            </div>
            <div class="clearfix"></div>
        }
    </div>
    <div id="footer">
        <div class="container first last">
            <div class="hidden-xs hidden-sm col-md-12 col-lg-12 first" id="footer-icons">
                <ul>
                    <li>
                        <a href="/Content/Why">
                            <img src="~/Images/HA/footer-icons/neden-hedef.png" alt="Neden Hedef AVM?" /></a></li>
                    <li>
                        <a href="/Content/Delivery">
                            <img src="~/Images/HA/footer-icons/kurulum-hizmeti.png" alt="Kurulum Hizmeti" /></a></li>
                    <li>
                        <a href="/Content/Delivery">
                            <img src="~/Images/HA/footer-icons/teslimat-kosullari.png" alt="Teslimat Koşulları" /></a></li>
                    <li>
                        <a href="/Content/CancellationRefund">
                            <img src="~/Images/HA/footer-icons/iade-degisim.png" alt="İade ve Değişim" /></a></li>
                    <li>
                        <a href="/Content/SecurityPolicy">
                            <img src="~/Images/HA/footer-icons/guvenli-alisveris.png" alt="Güvenli Alışveriş" /></a></li>
                </ul>
            </div>
            <div class="clearfix"></div>
            <div id="footer-content">
                @(Html.Raw(Parameters.PageFooter))
                <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 footer-content">
                    <h4>E-BÜLTEN ÜYELİĞİ</h4>
                    @{Html.RenderAction("MailListForm", "Partials", new { placeHolder = "e-posta adresi", submitText = "Üye Ol" });}
                    <h4>BİZİ TAKİP EDİN</h4>
                    @(Html.Raw(Parameters.HeaderSocialButtons))
                </div>
                <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3 last footer-content">
                    <img src="/Images/HA/footer-geotrust-and-cards.png" alt="GeoTrust" />
                    <img src="/Images/HA/footer-windows-azure.png" style="margin-top: 30px;" alt="Windows Azure" />
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 first last" id="footer-copyright">
                <div class="left">
                    &copy; @{@DateTime.Now.Year.ToString();}&nbsp;<a href="/">HEDEF AVM</a> Tüm Hakları Saklıdır.<br />
                    Designed by
                    <div style="background: url('/Images/HA/bataria-logo.png') no-repeat scroll 0% 0% transparent; width: 18px; height: 9px; display: inline-block; position: relative;">
                        <a href="http://www.bataria.com/" target="_blank" style="width: 4px; height: 100%; position: absolute; top: 0; left: 4px;"></a>
                    </div>
                </div>
                <div class="right alignright">
                    Bu site <a href="http://www.omaybilisim.com" target="_blank" style="color: #CE401C;">OMAY eStore</a> e-ticaret sistemi ile hazırlanmıştır.
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
    <div id="goToUp" title="Yukarı Git"></div>
    <div class="clearfix"></div>
    @{Html.RenderAction("ReadyLightbox", "Home");}
    @*Hızlı Bak*@
    @{Html.RenderAction("QuickView", "Product");}
    @*Marka ve Ürün Arama*@
    @{Html.RenderAction("SearchBrandAndProducts", "Partials");}
    <script type="text/javascript">
        function GetSearchProduct()
        {
            var myText = $("#Search").val();
            $.ajax({
                url: '/Search/LiveSearch?search=' + myText,
                type: 'POST',
                success: function (result)
                {
                    $("#divLoadingGif").css("display", "none");
                    var myProductList = $(result);
                    var myHtlmString = '';
                    $.each(myProductList[0].LiveSearch, function (key, val)
                    {
                        myHtlmString += '<li><a href="' + val.LinkUrl + '">' + val.ProductCode + ' - ' + val.ProductName + '</a></li>';
                    });
                    myHtlmString = '<ul id="live_search_results">' + myHtlmString + '</ul>';
                    $("#divSearchResult").html(myHtlmString);
                }
            });
        }
        var search = (function ()
        {
            var builder = function ()
            {
                $(document).ready(function ()
                {
                    var object = $('#Search', $('.window.searchview').hide().parent()).focus(function ()
                    {
                        this.active = true;
                        var value = $.trim(this.value);
                        if (value == object.data('empty'))
                        {
                            object.val('').parent().addClass('focus');
                        } else if (value.length >= 3) { search.show(); }
                    }).blur(function ()
                    {
                        this.active = false;

                        $(this.parentNode).removeClass('focus');
                        if ($.trim(object.val()) == '') { object.val(object.data('empty')); }
                    }).keyup(function ()
                    {
                        if (object.val().length >= 4)
                        {
                            $("#divLoadingGif").css("display", "block");
                            GetSearchProduct();
                            search.show();
                            $(this.parentNode).removeClass('focus');
                        } else
                        {
                            search.hide();
                            $(this.parentNode).addClass('focus');
                        }
                    });

                    var parent = object.parents('.container').hover(function () { this.active = true; }, function ()
                    {
                        this.active = false;
                        if (!object.prop('active')) { search.hide(); }
                    });
                });
            }
            builder.prototype = {
                busy: false,
                show: function () { $('.window.searchview').stop(true, true).animate({ opacity: 'show', height: 'show' }, 'fast'); },
                hide: function () { $('.window.searchview').stop(true, true).animate({ opacity: 'hide', height: 'hide' }, 'fast'); }
            };

            return new builder();
        })();
    </script>


    <script type="text/javascript">
        $(document).ready(function ()
        {
            $(".box-category ul").each(
              function ()
              {
                  var elem = $(this);
                  if (elem.children().length == 0)
                  {
                      elem.remove();
                  }
              }
            );

            imagesOnError();

            if (!$(".kategoriMenusu ul.ul-level-1 li.menu-level1").hasClass("active"))
            {
                $(".kategoriMenusu ul.ul-level-1 li.menu-level1:first-child ul li.menu-level2").parent().css({ "display": "block" });
                $(".kategoriMenusu ul.ul-level-1 li.menu-level1:first-child").find(".act-cat").css({ "cursor": " pointer", "background-image": "url('/Images/HA/act-cat-expanded.png')" });
            }
            $(".staticPageContent .staticPageRightContent").each(function ()
            {
                var hhh = $(this).parent().find(".staticPageLeftContent").height();
                if ($(this).height() < hhh)
                {
                    $(this).css({ "height": hhh + "px", "line-height": hhh + "px" });
                }
                else
                {

                    $(this).css({ "height": $(this).height() + "px", "line-height": $(this).height() + "px" });
                }
            });
            $(".TelefonNo").mask("0(999) 999 9999");
            $(".TcKimlikNo").mask("99999999999");
            $(".n_serino").mask("a99");
            $(".n_cuzdanno").mask("999999");
            $(".n_numerik10").mask("?9999999999");
            $(".aylikgelir").mask("?999999999");
            $("input[name=Phone]").mask("0(999) 999 9999");
            $("input[name=Mobile]").mask("0(999) 999 9999");
            $("input[name=OtherTcKimlikNo]").mask("99999999999");
            $("input[name=OtherMonthlyIncoming]").mask("?99999999");
        });

        $(document).ajaxComplete(function ()
        {
            $(".TelefonNo").mask("0(999) 999 9999");
            $(".TcKimlikNo").mask("99999999999");
            $(".n_serino").mask("a99");
            $(".n_cuzdanno").mask("999999");
            $(".n_numerik10").mask("?9999999999");
            $(".aylikgelir").mask("?999999999");
            $("input[name=Phone]").mask("0(999) 999 9999");
            $("input[name=Mobile]").mask("0(999) 999 9999");
            $("input[name=OtherTcKimlikNo]").mask("99999999999");
            $("input[name=OtherMonthlyIncoming]").mask("?99999999");
            imagesOnError();
        });
        $(window).load(function ()
        {
            imagesOnError();
        });

        function imagesOnError()
        {
            var listImageTypeW = '@(ViewBag.ListImageType)';
            if (listImageTypeW != '')
            {
                listImageTypeW = '_' + listImageTypeW;
            }
            $('.products ul li .product-outer .product-inner .product-image a.prdLink img').error(function ()
            {
                $(this).attr('src', '/Images/@Parameters.Theme/product-image-not-found-200x' + listImageTypeW + '.jpg');
            });
            $('.special-products-content ul li a img').error(function ()
            {
                $(this).attr('src', '/Images/@Parameters.Theme/product-image-not-found-200x' + listImageTypeW + '.jpg');
            });
            $('.suggested-products-content ul li a img').error(function ()
            {
                $(this).attr('src', '/Images/@Parameters.Theme/product-image-not-found-200x' + listImageTypeW + '.jpg');
            });
            $('.shop-cart table tbody tr td.image img').error(function ()
            {
                $(this).attr('src', '/Images/@Parameters.Theme/product-image-not-found-200x' + listImageTypeW + '.jpg');
            });
            $('.related-products-content ul li a img').error(function ()
            {
                $(this).attr('src', '/Images/@Parameters.Theme/product-image-not-found-200x' + listImageTypeW + '.jpg');
            });
            $('.categories ul li .category-outer .category-inner .category-image img').error(function ()
            {
                $(this).attr('src', '/Images/@Parameters.Theme/category-image-not-found.jpg');
            });
        }
        $('.act-cat').click(function ()
        {
            if ($(this).next('.level-2-cat').css('display') != 'block')
            {
                $(".act-cat").css({ 'background-image': 'url(/Images/HA/act-cat.png)' });
                $(this).css({ 'background-image': 'url(/Images/HA/act-cat-expanded.png)' });
                $('.level-2-cat').slideUp('fast');
                $('.level-2-cat').removeClass('open');
                $(this).next('.level-2-cat').toggleClass('open');
                $(this).next('.level-2-cat').slideToggle(0);
                $(this).next('.level-2-cat').css('overflow', '');
            }
        });
        var menuDeleteAfterThis = 9;
        $('ul.level-2-cat').each(function ()
        {
            var topMenuLink = $(this).parent().find('a.menu-link-level1').attr('href');
            var thisMenu = $(this);
            if (thisMenu.find('li.menu-level2').size() > menuDeleteAfterThis + 1)
            {
                thisMenu.find('li.menu-level2').each(function ()
                {
                    if ($(this).index() > menuDeleteAfterThis - 1)
                    {
                        $(this).remove();
                    }
                });
                thisMenu.append('<li class="menu-level2"><a id="mn_000" class="cLink menu-link-level2" href="' + topMenuLink + '">Tümünü Gör</a></li>');
            }
        });
        var menuActiveCounter = 0;
        $('.menu-level0.hasSub img').click(function ()
        {
            $(this).parent().parent().find('.kategoriMenusu').slideToggle('normal').css('overflow', '');
        });
        $(document).mouseup(function (e)
        {
            var menu = $('.menu-level0.hasSub .kategoriMenusu');

            if (!menu.is(e.target) && menu.has(e.target).length === 0 && !$('.menu-level0.hasSub img').is(e.target))
            {
                menu.slideUp('normal');
            }
        });


        //$('.box-category li').last().addClass('last');
        //$('.box-category li li').last().addClass('last');

        //        $(function () {
        //            $(".addTooltip").tooltip();
        //        });
    </script>


    <script type="text/javascript">
        $('#Loading').hide();

        $('a.pLink222').click(function ()
        {
            var qsId = $(this).attr('id').split("_")[1];
            $('#content').load('/Products/Get', { id: qsId });

            $('a.pLink').removeClass("active");
            $('a.cLink').removeClass("active");
            $(this).addClass("active");
            return false;
        });
        $('a.cLink222').click(function ()
        {
            var qsId = $(this).attr('id').split("_")[1];
            $('#content').load('/Categories/Get', { id: qsId });

            $('a.pLink').removeClass("active");
            $('a.cLink').removeClass("active");
            $(this).addClass("active");
            return false;
        });

        var afth = $('a.cLink[href="' + location.pathname + '"]');
        if (afth.attr('id') == undefined)
        {
            afth = $('a.pLink[href="' + location.pathname + '"]');
        }

        if (afth.attr('id') != undefined)
        {
            afth.addClass('active');

            //afth.parents('ul').css('display', 'block');

            afth.parents("li").addClass('active');
            //afth.parent().parents('ul').css('display', 'block');
            //afth.parent('ul').css('display', 'block');
        }
        $(".kategoriMenusu ul.ul-level-1 li.menu-level1 ul li.menu-level2:first-child").append("<div class=\"menu-level2-integrate\"></div>");
    </script>
    <script type="text/javascript">
        $("#mainMenuSelect").change(function ()
        {
            window.location.href = $("#mainMenuSelect").val();
        });
    </script>
    <script src="~/Scripts/fancylaunch.js"></script>
    @Html.Raw(Parameters.AddThisShareButtonsSmartLayerScript)
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/Scripts/footer-general.js?v=" + cjVer)" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/html5shiv.js")" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/respond.js")" type="text/javascript"></script>
    @{Html.RenderAction("ManagerScripts", "Home");}
</body>
</html>
